<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<script type="text/javascript">
    var deleteOpts = {
    	msg : "<bean:message key="office.delete.msg" bundle="errors"/>",
        boxTitle : "<bean:message key="office.delete.boxTitle" bundle="errors"/>",
        msgStatus: "<bean:message key="office.delete.msgStatus" bundle="errors"/>"
    };
</script>

<c:forEach items="${requestScope.offices}" var="item">
	<div class="result" id="result-${item.officeID}">
	<ul class="itemResultNW">
		<li>
		<p class="ORNumber">${item.number}</p>
		</li>
		<li>
		<p class="OBuilding">${item.building}</p>
		</li>
		<li>
		<p class="OFloor">${item.floor}</p>
		</li>
		<li>
		<p class="OName">${item.name}</p>
		</li>
		<li>
		<p class="OPhone">${item.phone}</p>
		</li>
		<li class="panelOffice" id="panelOffice-${item.officeID}">
			<p class="officeDelete">
			 <a class="aOfficeDelete" href="javascript:deleteoffice(${item.officeID},'${pageContext.request.contextPath}/admin/deleteoffice.do');">
			     <img class="imgPanelOffice" src="<c:url value="/layout/images/form/Delete.png"/>" alt="<bean:message key="office.delete" bundle="office"/>" title="<bean:message key="office.delete" bundle="office"/>" />
			 </a>
			</p>
			<p class="officeEdit"><a class="aOfficeEdit" href="${pageContext.request.contextPath}/admin/activeeditoffice.do?officeID=${item.officeID}"><img class="imgPanelOffice" src="<c:url value="/layout/images/form/Edit2.png"/>" alt="<bean:message key="office.edit" bundle="office"/>" title="<bean:message key="office.edit" bundle="office"/>" /></a></p>
		</li>
	</ul>
	</div>
</c:forEach>